package com.seckill.common.error;

/**
 * 用户错误码--2000开头
 */
public enum UserError implements CommonError {
    // 用户相关错误类型--2000开头
    USER_NOT_EXIST(20001, "用户不存在");

    private int errorCode;
    private String errorMsg;

    private UserError(int errorCode, String errorMsg) {
        this.errorCode = errorCode;
        this.errorMsg = errorMsg;
    }

    @Override
    public int getErrorCode() {
        return this.errorCode;
    }

    @Override
    public String getErrorMsg() {
        return this.errorMsg;
    }

    @Override
    public CommonError setErrorMsg(String errorMsg) {
        this.errorMsg = errorMsg;
        return this;
    }
}
